package edu.usx.server.mapper;

import edu.usx.server.pojo.CategoryRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Usx
 * @since 2024-07-19
 *
 */
@Mapper
public interface CategoryRoleMapper extends BaseMapper<CategoryRole> {
    /**
     * 批量插入category_role
     * @param role
     */
//    @Insert("insert into category_role (cid,urole) values (#{cid},#{urole})")
    void insertBatch(List<CategoryRole> role);

    /**
     * 根据category_id删除
     * @param cid
     */
    @Delete("delete from category_role where cid=#{cid}")
    void deletecategoryBatchId(Integer cid);
}
